<?php
//用于计算总的分红
    class s{
    	public function x($I=1000000){
    		$s1 = 100000*0.1;
    		$s2 = $s1+100000*0.075;
    		$s3 = $s2+200000*0.05;
    		$s4 = $s3+200000*0.03;
    		$s5 = $s4+400000*0.015;
    		if($I<100000){
    			$sum = $I*0.01;
    		}
    		elseif($I<200000){
    			$sum = $s1+($I-100000)*0.075;
    		}
    		elseif($I<400000){
    			$sum = $s2+($I-200000)*0.05;
    		}
    		elseif($I<600000){
    			$sum = $s3+($I-400000)*0.03;
    		}
    		elseif($I<1000000){
    			$sum = $s4+($I-600000)*0.015;
    		}
    		else
    			$sum = $s5+($I-1000000)*0.01;
    		echo "$sum";
    	}
    }
    $c1 = new s();
    $c1->x();
    ?>